# -*- coding: utf-8 -*-
#
# @Author: CPS
# @email: 373704015@qq.com
# @Date: 2024-04-18 14:44:41.277830
# @Last Modified by: CPS
# @Last Modified time: 2024-04-18 14:44:41.277830
# @file_path "Z:\work\2024\项目\中大模型数据提取处理"
# @Filename "types.py"
# @Description: 数据类型定义
#

from pydantic import BaseModel, Field


# 断面信息
class SectionDataType(BaseModel):
    river_name: str = Field(description="河道名称")
    river_part: str = Field(description="河段")
    sid: str = Field(description="断面号")
    xz_len: int = Field(description="断面坐标数量")
    xz_list: list[tuple[str, str]] = Field(description="断面坐标xy")
    next_section_distance_left: float = Field(description="下个断面距离(左)")
    next_section_distance_center: float = Field(description="下个断面距离(中)")
    next_section_distance_right: float = Field(description="下个断面距离(右)")
    Mann: float = Field(description="糙率")
    is_warnning: bool = Field(default=False, description="一些有问题的")
    # Exp: float = Field(description="扩散与收缩系数")
    # Cntr: float = Field(description="扩散与收缩系数")


# 河道信息
class RiverDataType(BaseModel):
    river_name: str = Field(description="河道名称")
    river_part: str = Field(description="河段")
    river_xy_len: int = Field(description="河段断面XY位置点数量")
    river_xy: list[tuple[str, str]] = Field(description="河段断面XY位置点")
    section_list: list[SectionDataType]


class TemplateData(BaseModel):
    top_id: str
    river_section_id: str
    section_id: str
    Mann: str
    section_xz_len: str
    section_xz_data: list[str]
